import request from "@/utils/request";
import { stringify } from "qs";
import { toFormData } from "@/utils/utils.jsx";

//打印记录列表的分页
export async function queryPrinttaskList(params) {
	return request(`/new-oms-ec/printTask/page?${stringify(params)}`);
}

//查询仓库列表(查询)
export async function queryWarehouseList(params) {
	return request(`/new-oms-ec/printTask/warehouseList?${stringify(params)}`);
}

//操作人列表
export async function queryOperationList(params) {
	return request(`/blade-user/user/getUserListByUuid?`, {
		method: "POST",
		data: params
	});
}

//查看快递面单打印记录
export async function queryPrinttaskDetail(params) {
	return request(`/new-oms-ec/printTask/detail?${stringify(params)}`);
}

//查看唯一码打印记录
export async function queryPrintCodeDetail(params) {
	return request(`/new-oms-ec/printTask/codeDetail?${stringify(params)}`);
}

//预览并重新打印
export async function queryViewAndPrint(params) {
	return request(`/new-oms-ec/printTask/viewAndPrint?${stringify(params)}`);
}

//根据订单编码获取面单打印数据
export async function getOrderPrintData(params) {
	return request(`/new-oms-ec/printTask/batchPrint`, {
		method: "POST",
		data: params
	});
}

//打印成功的记录更新
export async function updatePrintTime(params) {
	return request(`/new-oms-ec/printTask/printSuccess`, {
		method: "POST",
		data: params
	});
}

//设置打印机名称
export async function updatePrinterName(params) {
	return request(`/new-oms-ec/printTask/setPrinterNames`, {
		method: "POST",
		data: params
	});
}

// 保存打印记录
export async function saveCodePrintTask(params) {
	return request(`/new-oms-ec/printTask/saveCodePrintTask`, {
		method: "post",
		data: params,
	});
}

//档口信息
export async function getSupplierInfo(params) {
	return request(`/new-wms/supplierInfo/list`, {
		method: "post",
		data: params,
	});
}

//获取快麦唯一码打印数据
export async function getKuaiMaiPrint(params) {
	return request(`/new-wms/kuaimai/getKuaiMaiCodePrintList`, {
		method: "post",
		data: params,
	});
}
